package com.neusoft.elmboot1.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot1.po.Business;
import com.neusoft.elmboot1.service.IBusinessService;

@RestController
@CrossOrigin
@RequestMapping("/BusinessController")
public class BusinessController {
	@Autowired
	IBusinessService  busService;
	
	@RequestMapping("/listBusinessByOrderTypeId")
	public List<Business> test1(@RequestBody Business b){
		System.out.println("------------------:"+b.getOrderTypeId());
		Integer orderTypeId = b.getOrderTypeId();
		return busService.listBusinessByOrderTypeId(orderTypeId);
	}
}
